﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<nelech.Models.DBModel.ForumResponse>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%= Model.category.title %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script>
    function showImg(i) {
        var e = document.getElementById("img" + i);

        e.style.display = e.style.display == "block" ? "none" : "block";
    }

    function showMovie(i) {
        var e = document.getElementById("movie" + i);

        e.style.display = e.style.display == "block" ? "none" : "block";
    }



    function ShowResponse(i) {
        var e = document.getElementById("text" +i);
       
        e.style.display = e.style.display == "block" ? "none" : "block" ;
    }
    </script>
    <% Html.RenderPartial("ForumSearchControl"); %>
   <%-- <div id="left">
        <%Html.RenderAction("AdvertShowThree", "Advert", new { id = 7 });%>
    </div>--%>
    <div id="mainForum">
        <div>
            <h3>
                <%= Model.category.title %></h3>
            <h4>
                <%= Model.category.description%></h4>
        </div>
       <%= Html.ActionLink("הוסף שירשור חדש", "CreateSubject", "Forum", new {id = Model.category.id }, null)%>
       
        <ul class="forumResponse">
            <%
                var modelList = Model.responses.ToList();
                foreach (var item in modelList.Where(p => p.p_id == 0))
                {
                    Response.Write(nelech.Views.Shared.Code.Utils.GetSubjectHtml(item,0, modelList));
                }
            %>
        </ul>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
<script>
    function ShowText(id) {
        var e = document.getElementById("text" + id);
        e.style.display = e.style.display == "none" ? "block" : "none";
    }
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="publishTop" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Right" runat="server">
</asp:Content>
